﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLNHASACH.DTO;
using QLNHASACH.DataAccessLayer.ObjectDAO;

namespace QLNHASACH.BussinessLayer.ObjectBUS
{
    class NguoiDungBUS
    {
        public static NguoiDung LayThongTinNguoiDung(string tenDN)
        {
            if(NguoiDungDAO.KiemTraTonTai(tenDN))
                return NguoiDungDAO.LayThongTinNguoiDung(tenDN);
            return null;
        }
        public static bool ThayDoiMatKhau(string tenDN, string matKhauMoi)
        {
            if (NguoiDungDAO.KiemTraTonTai(tenDN))
            {
                if (NguoiDungDAO.ThayDoiMatKhau(tenDN, matKhauMoi) == true)
                    return true;
            }
            return false;
        }
    }
}
